package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class Procure {
    private String id;

    private String procureCode;

    private String procureType;

    private String supplier;

    private String procureTime;

    private String procureStatus;

    private String payStatus;

    private String processName;

    private String procureUser;

    private String remark;

    private String totalMoney;

    private String status;
    private String surePayUser;
    private String surePayTime;

    private Date createTime;

    private Date updateTime;

    private int count;
    private int materialCount;
    private String hasPayMoney;
    private String noPayMoney;

    private List<ProcureStorage> procureStorages;
    private List<ProcureClose> procureCloses;

    public static final transient Map<String, String> PAYSTATUSMAP =
            ImmutableMap.of("0", "未支付", "1", "已支付");

    //3 表示采购完成
    public static final transient Map<String, String> STATUSMAP =
            ImmutableMap.of("0", "待入库","1", "进行中", "2", "已完成", "3", "已完成", "4", "已取消");

    public static final transient Map<String, String> TYPESTATUSMAP =
            ImmutableMap.of("1", "合同", "2", "报销");


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getProcureCode() {
        return procureCode;
    }

    public void setProcureCode(String procureCode) {
        this.procureCode = procureCode == null ? null : procureCode.trim();
    }

    public String getProcureTypeCn() {
        return TYPESTATUSMAP.get(getProcureType());
    }
    public String getProcureType() {
        return procureType;
    }

    public void setProcureType(String procureType) {
        this.procureType = procureType == null ? null : procureType.trim();
    }

    public String getSupplier() {
        return supplier;
    }

    public void setSupplier(String supplier) {
        this.supplier = supplier == null ? null : supplier.trim();
    }

    public String getProcureTime() {
        return procureTime;
    }

    public void setProcureTime(String procureTime) {
        this.procureTime = procureTime == null ? null : procureTime.trim();
    }

    public String getProcureStatusCn() {
        return STATUSMAP.get(getProcureStatus());
    }
    public String getProcureStatus() {
        return procureStatus;
    }

    public void setProcureStatus(String procureStatus) {
        this.procureStatus = procureStatus == null ? null : procureStatus.trim();
    }

    public String getPayStatusCn() {
        return PAYSTATUSMAP.get(getPayStatus());
    }
    public String getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus == null ? null : payStatus.trim();
    }

    public String getProcessName() {
        return processName;
    }

    public void setProcessName(String processName) {
        this.processName = processName == null ? null : processName.trim();
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(String totalMoney) {
        this.totalMoney = totalMoney == null ? null : totalMoney.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getCreateTimeFt(){
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }

    public List<ProcureStorage> getProcureStorages() {
        return procureStorages;
    }

    public void setProcureStorages(List<ProcureStorage> procureStorages) {
        this.procureStorages = procureStorages;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getMaterialCount() {
        return materialCount;
    }

    public void setMaterialCount(int materialCount) {
        this.materialCount = materialCount;
    }

    public String getHasPayMoney() {
        return hasPayMoney;
    }

    public void setHasPayMoney(String hasPayMoney) {
        this.hasPayMoney = hasPayMoney;
    }

    public String getNoPayMoney() {
        return noPayMoney;
    }

    public void setNoPayMoney(String noPayMoney) {
        this.noPayMoney = noPayMoney;
    }

    public List<ProcureClose> getProcureCloses() {
        return procureCloses;
    }

    public void setProcureCloses(List<ProcureClose> procureCloses) {
        this.procureCloses = procureCloses;
    }

    public String getProcureUser() {
        return procureUser;
    }

    public void setProcureUser(String procureUser) {
        this.procureUser = procureUser;
    }

    public String getSurePayUser() {
        return surePayUser;
    }

    public void setSurePayUser(String surePayUser) {
        this.surePayUser = surePayUser;
    }

    public String getSurePayTime() {
        return surePayTime;
    }

    public void setSurePayTime(String surePayTime) {
        this.surePayTime = surePayTime;
    }

}